﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                assembly="Inovout.Kuajing.Exports"
				        namespace="Inovout.Kuajing.Exports.Models">

  <class name="OrderItem" table="Exports_OrderItem">
    <id name="Id" access="field.camelcase"
        column="OrderItemId" type="Int32">
      <generator class="native" />
    </id>
    <property name="CommodityName" type="String" />
    <property name="CommodityModel" type="String" />
    
    <property name="DrawerName" type="String" />
    <property name="DrawerTaxpayerNo" type="String" />
    
    <property name="Price" type="Decimal" />
    <property name="CurrencyName" type="String" />
    <property name="CurrencyCode" type="String" />
    
    <property name="Quantity" type="Decimal" />
    <property name="MeasuringUnitName" type="String" />
    <property name="MeasuringUnitCode" type="String" />

    <property name="Sum" type="Decimal" />
    
    <property name="PackageQuantity" type="Int32" />
    
    <property name="NetWeight" type="Decimal" />
    <property name="GrossWeight" type="Decimal" />

    <many-to-one name="Order" column="OrderId" class="Inovout.Kuajing.Exports.Models.Order" />
    <many-to-one name="Commodity" column="CommodityId" class="Inovout.Kuajing.Exports.Models.ExportCommodity"  cascade="all"/>
    <many-to-one name="Drawer" column="DrawerId" class="Inovout.Kuajing.Exports.Models.Drawer" cascade="all" />
    
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>
